package _binary_search;

/**
 * 441. 排列硬币
 */
public class No441 {
    public int arrangeCoins(int n) {
        int answer = 0;
        while (n >= 0) {
            n -= ++answer;
        }
        return answer - 1;
    }
}
